import React, { useState } from 'react'
import { useLocation } from "react-router-dom"

function Index() {
  const location = useLocation()
  const [obj, setObj] = useState(location.state)
  return (
    <div>
      <h1>详情页</h1>
      <p>楼盘名称:{obj.name}</p>
      <p>详细地址:{obj.area}</p>
      <p>价格:{obj.price}</p>
      <p>更新时间:{obj.update_time}</p>
      <p>经纪人:{obj.broker}</p>
    </div>
  )
}

export default Index
